const KEY = 'hm-tt-pc-userinfo'

export const setUser = (user) => {
  localStorage.setItem(KEY, JSON.stringify(user))
}

export const getUser = () => {
  return JSON.parse(localStorage.getItem(KEY)) || {}
}

export const delUser = () => {
  localStorage.removeItem(KEY)
}
